<?
    /**
	 * Elgg LDAP authentication
	 * 
	 * @package ElggLDAPAuth
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Misja Hoebe <misja@elgg.com>
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.com
	 */
?>
<fieldset style="border: 1px solid black; padding: 15px; margin: 0 10px 0 10px;">
<legend>CAS Settings</legend>
<fieldset style="border: 1px solid black; padding: 15px; margin: 0 10px 0 10px;">
<legend><?php echo elgg_echo('cas:settings:mysql:label:host')?></legend>
<label for="params[cashostname]"><?php echo elgg_echo('cas:settings:cas:label:hostname');?></label><br/>
  <div class="example"><?php echo elgg_echo('cas:settings:cas:help:hostname');?></div>
  <input type="text" name="params[cashostname]" value="<?php if (empty($vars['entity']->cashostname)) {echo "";} else {echo $vars['entity']->cashostname;}?>"/><br/>

<label for="params[casport]"><?php echo elgg_echo('cas:settings:cas:label:port')?></label><br/>
  <div class="example"><?php echo elgg_echo('cas:settings:cas:help:port')?></div>
  <input type="text" name="params[casport]" value="<?php if (empty($vars['entity']->casport)) { echo "443";} else { echo $vars['entity']->casport;}?>"/><br/>
  
<label for="params[casbaseuri]"><?php echo elgg_echo('cas:settings:cas:label:baseuri')?></label><br/>
  <div class="example"><?php echo elgg_echo('cas:settings:cas:help:baseuri')?></div>
  <input type="text" name="params[casbaseuri]" value="<?php if (empty($vars['entity']->casbaseuri)) { echo "/cas";} else { echo $vars['entity']->casbaseuri;}?>"/><br/>
</fieldset>
<fieldset style="border: 1px solid black; padding: 15px; margin: 0 10px 0 10px;">
<legend><?php echo elgg_echo('cas:settings:cas:settings')?></legend>
        <label for="params[casadminuser]"><?php echo elgg_echo('cas:settings:cas:adminuser')?></label><br/>
        <div class="example"><?php echo elgg_echo('cas:settings:cas:help:casadminuser')?></div>
  <input type="text" name="params[casadminuser]" value="<?php if (empty($vars['entity']->casadminuser)) { echo "";} else { echo $vars['entity']->casadminuser;}?>"/><br/>

        <label for="params[user_create]"><?php echo elgg_echo('cas:settings:cas:label:createuser');?></label><br/>
        <div class="example"><?php echo elgg_echo('cas:settings:cas:help:createuser')?></div>
        <select name="params[user_create]">
            <option value="on" <?php if ($vars['entity']->user_create == 'on') echo " selected=\"selected\" "; ?>>Enabled</option>
            <option value="off" <?php if ($vars['entity']->user_create == 'off') echo " selected=\"selected\" "; ?>>Disabled</option>
        </select>
        <br/>
<label for="params[caslogout]"><?php echo elgg_echo('cas:settings:cas:label:logout');?></label><br/>
        <div class="example"><?php echo elgg_echo('cas:settings:cas:help:logout')?></div>
        <select name="params[caslogout]">
            <option value="on" <?php if ($vars['entity']->caslogout == 'on') echo " selected=\"selected\" "; ?>>Enabled</option>
            <option value="off" <?php if ($vars['entity']->caslogout == 'off') echo " selected=\"selected\" "; ?>>Disabled</option>
        </select>        

</fieldset>


</fieldset>
<fieldset style="border: 1px solid black; padding: 15px; margin: 0 10px 0 10px;">
<legend>MySQL Settings</legend>
<p>
    <fieldset style="border: 1px solid; padding: 15px; margin: 0 10px 0 10px">
        <legend><?php echo elgg_echo('cas:settings:mysql:label:host');?></legend>
        
        <label for="params[mysqlhostname]"><?php echo elgg_echo('cas:settings:mysql:label:hostname');?></label><br/>
        <input type="text" name="params[mysqlhostname]" value="<?php if (empty($vars['entity']->mysqlhostname)) {echo "localhost";} else {echo $vars['entity']->mysqlhostname;}?>"/><br/>
        
        <label for="params[mysqlport]"><?php echo elgg_echo('cas:settings:mysql:label:port');?></label><br/>
        <input type="text" name="params[mysqlport]" value="<?php if (empty($vars['entity']->mysqlport)) {echo "3306";} else {echo $vars['entity']->mysqlport;}?>"/><br/>
        
        <label for="params[mysqluser]"><?php echo elgg_echo('cas:settings:mysql:label:user');?></label><br/>
        <input type="text" name="params[mysqluser]" value="<?php if (empty($vars['entity']->mysqluser)) {echo "root";} else {echo $vars['entity']->mysqluser;}?>"/><br/>
        
        <label for="params[mysqlpass]"><?php echo elgg_echo('cas:settings:mysql:label:pass');?></label><br/>
        <input type="text" name="params[mysqlpass]" value="<?php if (empty($vars['entity']->mysqlpass)) {echo "123456";} else {echo $vars['entity']->mysqlpass;}?>"/><br/>

        <label for="params[mysqldbname]"><?php echo elgg_echo('cas:settings:mysql:label:dbname');?></label><br/>
        <input type="text" name="params[mysqldbname]" value="<?php if (empty($vars['entity']->mysqldbname)) {echo "elgg";} else {echo $vars['entity']->mysqldbname;}?>"/><br/>
        
        <label for="params[mysqltbname]"><?php echo elgg_echo('cas:settings:mysql:label:tbname');?></label><br/>
        <input type="text" name="params[mysqltbname]" value="<?php if (empty($vars['entity']->mysqltbname)) {echo "elgg_users_entity";} else {echo $vars['entity']->mysqltbname;}?>"/><br/>
        
        <label for="params[mysqlfield]"><?php echo elgg_echo('cas:settings:mysql:label:field');?></label><br/>
        <input type="text" name="params[mysqlfield]" value="<?php if (empty($vars['entity']->mysqlfield)) {echo "username";} else {echo $vars['entity']->mysqlfield;}?>"/><br/>
    </fieldset>
</p>
</fieldset>